package com.yufubao.api.controller.management.supplier;

import com.yufubao.framework.annotation.SystemLog;
import com.yufubao.framework.result.PageUtils;
import com.yufubao.framework.result.ResponseResult;
import com.yufubao.service.service.applet.product.SupplierInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author 张一恒
 * @version 1.0
 * @description:
 * @date 2024/9/18 16:44
 */
@Api("商家")
@RestController
@RequestMapping("/applet/management/supplier")
public class SupplierController {

    @Autowired
    private SupplierInfoService supplierInfoService;


    /**
     * pageList 查询当前人员下小蜜蜂的商家信息，如果是admin查询所有
     */
    @RequestMapping(value = "/pageList", method = RequestMethod.POST)
    @ApiOperation(value = "查询当前人员下小蜜蜂的商家信息")
    @SystemLog(info = "查询当前人员下小蜜蜂的商家信息")
    public ResponseResult pageList(@RequestBody Map<String, Object> params) {
        PageUtils page = supplierInfoService.pageList(params);

        return ResponseResult.okResultPage("page", page);
    }




}
